<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>

    <style>
        .left,
        .right {
            float: left;
            width: 200px;
            height: 300px;
            background-color: purple;
        }

        .right {
            float: right;
        }
    </style>
</head>

<body>
    <div class="left">11111111</div>
    <div class="right">2111111</div>
</body>

</html>